package vn.demand.dragon.controller
{
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	import vn.demand.dragon.model.MasterdataProxy;
	import vn.demand.dragon.model.vo.Supplier;
	
	public class SupplierRemovedCommand extends SimpleCommand
	{
		override public function execute( note:INotification ) :void    
		{
			var masterdataProxy : MasterdataProxy = facade.retrieveProxy(MasterdataProxy.NAME) as MasterdataProxy;
			var supplier:Supplier = note.getBody() as Supplier;
			masterdataProxy.removeObject(new XML("<type><label>" + supplier.sup_name + "</label><data>" + supplier.sup_id + "</data></type>"), 'supplier');
		}

	}
}